package jsu.blogger.service.impl;
import jsu.blogger.mapper.MessageMapper;
import jsu.blogger.pojo.Message;
import jsu.blogger.service.inter.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class MessageServiceImpl implements MessageService {
    @Autowired
    private MessageMapper messageMapper;
    @Override
    public boolean keepMessage(Message message) {
        boolean result = false;
        try {
            if(messageMapper.insertMessage(message)==1){
                result = true;
            }
        }catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }

    @Override
    public boolean acceptedMessageByReceiverID(Long receiverID) {
        return false;
    }

    @Override
    public boolean getAllUn(Long receiverID) {
        return false;
    }
}